package com.github.data_manage.domain.config

import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.context.annotation.Configuration

@Configuration
@ConfigurationProperties(prefix = "email")
open class EmailConfig {

    open var clientId: String? = null

    open var tenantId: String? = null

    open var userName: String? = null

    open var password: String? = null

    open var graphUserScopes: String? = null

    fun getGraphUserScopesArray(): Array<String> {
        return graphUserScopes?.split(",")?.toTypedArray() ?: emptyArray()
    }

}
